const { get, post } = require('../utils/request')

// 获取用户余额信息
const getUserBalance = () => {
  return get('/user/balance/my')
}

// 用户充值
const recharge = (rechargeData) => {
  return post('/user/recharge', rechargeData)
}

// 获取充值记录
const getRechargeRecords = (params) => {
  return get('/user/recharge/records', params)
}

// 获取充值统计信息
const getRechargeStatistics = () => {
  return get('/user/my-statistics')
}

// 获取余额信息（别名方法，保持兼容性）
const getBalance = () => {
  return getUserBalance()
}

module.exports = {
  getUserBalance,
  getBalance, // 添加别名方法
  recharge,
  getRechargeRecords,
  getRechargeStatistics
} 